package com.major.graph;

public class GraphMain {
    public static void main(String[] args) {
        Graph graph = new Graph(5);
        Vertex vertex1 = new Vertex("A");
        Vertex vertex2 = new Vertex("B");
        Vertex vertex3 = new Vertex("C");
        Vertex vertex4 = new Vertex("D");
        Vertex vertex5 = new Vertex("E");

        graph.addVertex(vertex1);
        graph.addVertex(vertex2);
        graph.addVertex(vertex3);
        graph.addVertex(vertex4);
        graph.addVertex(vertex5);

        graph.addEdge("A","C");
        graph.addEdge("B","C");
        graph.addEdge("A","B");
        graph.addEdge("B","D");
        graph.addEdge("B","E");

        graph.showGraph();

        graph.dfs();
    }
}
